import request from '@/utils/request'

// 查询小组列表
export function listGroups(query: any) {
  return request({
    url: '/system/groups/list',
    method: 'get',
    params: query
  })
}

// 查询小组详细
export function getGroups(groupID: number) {
  return request({
    url: '/system/groups/' + groupID,
    method: 'get'
  })
}

// 新增小组
export function addGroups(data: any) {
  return request({
    url: '/system/groups',
    method: 'post',
    data: data
  })
}

// 修改小组
export function updateGroups(data: any) {
  return request({
    url: '/system/groups',
    method: 'put',
    data: data
  })
}

// 删除小组
export function delGroups(groupID: number) {
  return request({
    url: '/system/groups/' + groupID,
    method: 'delete'
  })
}

// 查询个人小组列表
export function MessageListGroups() {
  return request({
    url: '/system/groups/MessageList',
    method: 'get',
  })
}

// 查询班级小组列表
export function ClassListGroups() {
  return request({
    url: '/system/groups/ClassList',
    method: 'get',
  })
}
